<%@ Control Language="C#" AutoEventWireup="true" CodeFile="TopMenu.ascx.cs" Inherits="admin_webparts_Common_TopMenu" %>
<%@ Import Namespace="NTTHAO.CommonWeb" %>
<ul id="nav_menu">
	<li><a href="../admin/?"><%=LanguageUtility.GetLanguageText("HOME", Session)%></a></li>
    <li><a href="?type=page"><%=LanguageUtility.GetLanguageText("CONTENT", Session)%></a></li>
    <!--<li><a href="?type=upload"><%=LanguageUtility.GetLanguageText("FILE_MANAGEMENT", Session)%></a></li>-->
    <li><a href="?type=page&name=files"><%=LanguageUtility.GetLanguageText("FILE_MANAGEMENT", Session)%></a></li>
	<%if (this._LoggedUser != null && this._LoggedUser.Type == NTTHAO.Common.BL.AdminUser.ADMIN_TYPE)
   { %>
    <li><a href="?type=user"><%=LanguageUtility.GetLanguageText("ADMIN_USER", Session)%></a></li>
    <%} %>
    <%if(Context.User.Identity.Name.Equals("admin", StringComparison.OrdinalIgnoreCase)) { %>
    <li><a href="?type=ser"><%=LanguageUtility.GetLanguageText("SECURITY", Session)%></a></li>
    <li><a href="?type=lang"><%=LanguageUtility.GetLanguageText("LANGUAGE", Session)%></a></li>
    <li><a href="?type=plug_in"><%=LanguageUtility.GetLanguageText("PLUG-IN_MANAGEMENT", Session)%></a></li>
    <%} %>
</ul>
<div id="profile"><span><a title="<%=LanguageUtility.GetLanguageText("CHANGE_PASSWORD", Session) %>" href="?type=profile"><%=Context.User.Identity.Name %></a></span>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="Logout.aspx?ReturnUrl=<%=Server.UrlEncode(Request.RawUrl) %>"><%=LanguageUtility.GetLanguageText("LOGOUT", Session)%></a></div>
<script type="text/javascript">
	if (typeof selectedMenu == "undefined" )
	    var selectedMenu = 0;
	
	if (location.href.indexOf("?type=page&name=files", 0) >= 0) {
	    var selectedMenu = 2;
	}
	
	var licontrols = document.getElementById("nav_menu").getElementsByTagName("li");
	for (var i=0; i<licontrols.length; i++) {
		if(i==selectedMenu)
			licontrols[i].className='selected';
		else
			licontrols[i].className='';
	}
</script>